<?php
	
class Table_DefileDans extends Zend_Db_Table_Abstract
{
    protected $_name    = 'defiledans';
    protected $_primary = 'DEFILE_NUMERO,VIP_NUMERO';
    protected $_sequence = FALSE;
 	
	public function insertDefileDans($numDefile, $numVip){
		$data = array('DEFILE_NUMERO' => $numDefile, 'VIP_NUMERO'=> $numVip);
		$this->insert($data);
	}
	
	public function getNumDefile($idVip){
		return $this->fetchRow($this
			->select()
			->where('VIP_NUMERO= ?', $idVip));
	}	
	public function supprDefileDans($id){
		$this->delete('VIP_NUMERO ='.(int)$id);
		/*$where = $this->getAdapter()->quoteInto('VIP_NUMERO = ?', $id);

		$this->delete($where);*/
	}
	public function supprDefileDansDef($id){
		//var_dump($id);
		$this->delete('DEFILE_NUMERO ='.(int)$id);
		/*$where = $this->getAdapter()->quoteInto('VIP_NUMERO = ?', $id);

		$this->delete($where);*/
	}
	
}